package abc2;

public class shuxianhua {

	public static void main(String[] args) {
		int ge=0;
		int shi=0;
		int bai=0;
		int sum=0;
		for(int i=100;i<1000;i++){
			bai=i/100;
			shi=(i/10)%10;
			ge=i%10;
			if(i==ge*ge*ge+shi*shi*shi+bai*bai*bai){
				System.out.println(i);
				sum+=i;
			}
		}
		System.out.println(sum);
	}
}
